    package com.code.day17;

    import java.util.ArrayList;
    import java.util.stream.Stream;

    public class Demo02Stream {
        public static void main(String[] args) {
            /**
             * 针对于数组
             * static <T>  Stream<t> of(T... values) //可变参数
             */
                Stream stream = Stream.of("张三","张三","张三","张三");
            System.out.println( stream);

            /**
             * 针对于集合
             *  default Stream<E> stream()
             */
            ArrayList<String> list = new ArrayList<>();

            list.add("哪吒");
            list.add("金吒");
            list.add("木吒");
            list.add("水吒");
            list.add("火吒");
            list.add("土吒");

            Stream<String> stream1 = list.stream();
            System.out.println(stream1);

        }
    }
